Repository navigation
examples: pay-on-proof (PayPal, Braintree, USDC/x402): an agent pays only against a verified INAM receipt - #169
Merged
Merged
Conversation
…receipt, void otherwise) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d EIP-3009 payload kept, capture = facilitator verify+settle, void = discard) A small Rail interface (hold, confirm, capture, void) replaces the PayPal-only path; PayPalRail adapts the existing client. X402Rail signs the EIP-712 transferWithAuthorization with @noble/curves (no new dependency) for USDC on Base Sepolia; its domain separator is pinned against the on-chain value. mockFacilitator() checks signature, recipient, amount, expiry and nonce reuse. The server takes ?rail=paypal|usdc and goes live on USDC only when X402_BUYER_PRIVATE_KEY and X402_SELLER_ADDRESS are set. The UI gets a rail toggle and a Rail ledger column. Tests run all four scenarios on both rails and check that one seller's reputation counts jobs from both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rse) and .env loading Braintree is the PayPal-family sandbox open to developers outside PayPal's markets; fake-paypal-one-time-nonce stands in for a PayPal wallet payment. .env and .env.* are now gitignored; .env.example lists every key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Node 22.13+, names all three rails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
examples/pay-on-proof/: an AI agent may move money only against a verified INAM receipt.checkTrust(seller). A deny stops the run before any payment call.authorizePaymentMethod.acceptWorkwith what actually arrived and what is actually held:The same receipt and the same reputation come out of every rail. The gates are plain code. The optional AI (Gemini or Claude) writes the seller's work and explains each step; it cannot move money.
Verified
HOLD_MISMATCH).tests/payOnProof.test.ts: 14/14 pass.tsc --noEmitis clean.Also
.envand.env.*are now gitignored..env.examplelists every key.🤖 Generated with Claude Code